package com.fwx.java2025420.controller;

import com.fwx.java2025420.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
/* @Autowired
    public  UserController(UserService userService) {
        this.userService = userService;
        System.out.println("构造方法注入");
    }*/

@Controller
public class UserController {
    UserService userService;
    @Autowired
    public void setUserService(UserService userService) {
        this.userService = userService;
        System.out.println("set方法注入");
    }

    public void user() {
        userService.DIService();
        System.out.println("controller....");
    }
}
